package com.golxen.framework.common.server.game.cmd.user.login;


import com.golxen.framework.GameProtocol;
import com.golxen.framework.PBPacket.PBPacket;
import com.golxen.framework.common.server.game.cmd.AbstractCommand;
import com.golxen.framework.common.server.game.cmd.Cmd;
import com.golxen.framework.user.player.GamePlayer;
import com.golxen.framework.user.player.GamePlayerMgr;
import com.golxen.utils.LogUtil;
import com.google.protobuf.Message;

@Cmd(code = GameProtocol.S_KICK_OUT_PLAYER, desc = "踢玩家下线（清缓存）")
public class KickOutPlayerCmd extends AbstractCommand {
    @Override
    public Message parseData(PBPacket packet) throws Exception {
        return null;
    }

    @Override
    public void execute(GamePlayer player, PBPacket packet) throws Exception {
    	LogUtil.COMMON.debug(" logout userId={} isKick={}", packet.getPlayerId(), true);
        GamePlayerMgr.onLogout(player, true);
    }

    @Override
    public void sendData(GamePlayer player) {

    }
}
